<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        /* 
            需求：根据用户的出生年份计算出今年多少岁
         */
        //  第一步获取用户的出生年份

        var birthYears = prompt("你的生日是？");
        var userAge = 2025-birthYears;
        console.log("你今年"+userAge+"岁了");
    </script>
</head>
<body>
    
</body>
</html>